<template>
  <div style="border: 1px solid red; padding: 30px; margin: 30px">
    <h3>我是父组件--- {{ count }}</h3>
    <!-- <Child1 :a="count" @AAAA="getFromSom" /> -->
    <!-- <Child1 :value="count" @input="getFromSom" /> -->
    <!-- <Child1 v-model="count" /> -->
    <!-- 如果下面这样写，子组件的属性名称 就叫 a， 事件名称叫 update:a -->
    <!-- <Child1 :a.sync="count" /> -->
    <Child2 v-model="count" />
  </div>
</template>

<script>
import Child2 from '@/views/test/child2.vue'
export default {
  name: '',
  components: {
    Child2
  },
  data() {
    return {
      count: 1
    }
  },
  methods: {
    getFromSom(param) {
      this.count = param
    }
  }
}
</script>
